<?php

class Clientes extends MY_Model {
 
    function Clientes()
    {
        // Call the Model constructor
        parent::MY_Model();

	$this->nombreTabla = "cliente";
	$this->idT1= "idCliente";
	$this->nombreCampo="nombre";

		$this->campos[] = array("realname" => "idUsuario",
					"clase" => "foranea",
					"label" => "",
					"modelo" => "Usuario",
					"rules" => "integer");
		
		$this->campos[] = array("realname" => "nombre",
					"clase" => "text",
					"label" => "Nombre",
					"rules" => "required|min_length[3]|max_length[45]||alpha_numeric_space");
		
		$this->campos[] = array("realname" => "apellido",
					"clase" => "text",
					"label" => "Apellido",
					"rules" => "required|min_length[3]|max_length[45]||alpha_numeric_space");
		
		$this->campos[] = array("realname" => "mail",
					"clase" => "text",
					"label" => "Mail",
					"rules" => "trim|required|valid_email");
		
		$this->campos[] = array("realname" => "telefono",
					"clase" => "text",
					"label" => "Telefono",
					"rules" => "required|numeric|min_length[5]|max_length[30]");
		
		$this->campos[] = array("realname" => "idCiudad",
					"clase" => "opciones",
					"label" => "Ciudad",
					"modelo" => "ciudad",
					"rules" => "required|integer");
		// Nombre de los modelos que son hijos
		 $this->hijos = array('reserva'=>'Reserva');
    }


     
}


?>
